Package | smart.who.int.immunizations-measles |
Type | StructureMap |
Id | Id |
FHIR Version | R4 |
Source | http://smart.who.int/immunizations-measles/https://build.fhir.org/ig/WorldHealthOrganization/smart-example-immz/StructureMap-IMMZD1LMToResources.html |
Url | http://smart.who.int/immunizations-measles/StructureMap/IMMZD1LMToResources |
Version | 0.1.0 |
Status | draft |
Date | 2024-09-21T14:59:40+00:00 |
Name | IMMZD1LMToResources |
Experimental | False |
Authority | who |
Description | Immunization - Client History - Transform logical model to resources |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
Generated Narrative: StructureMap IMMZD1LMToResources
map "http://smart.who.int/immunizations-measles/StructureMap/IMMZD1LMToResources" = "IMMZD1LMToResources" // Immunization - Client History - Transform logical model to resources uses "http://smart.who.int/immunizations-measles/StructureDefinition/IMMZD1ClientHistoryMeasles" alias IMMZD1 as source uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target group IMMZD1ToBundle(source immz : IMMZD1, target bundle : Bundle) { immz -> bundle.type = 'collection' "SetCollection"; immz.patient as patient then { immz.dose0 as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { patient -> obs.subject = patient "SetPatient"; content -> obs.code = create('CodeableConcept') as code then { content -> code.coding = create('Coding') as coding then { content -> coding.system = 'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1' "SetObsSystem"; content -> coding.code = 'DE80' "SetObsCode"; } "SetObsCoding"; } "SetObsCode"; content -> obs.value = content "SetValue"; } "SetDose0Observation"; immz.completedPrimarySeries as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { patient -> obs.subject = patient "SetPatient"; content -> obs.code = create('CodeableConcept') as code then { content -> code.coding = create('Coding') as coding then { content -> coding.system = 'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1' "SetObsSystem"; content -> coding.code = 'DE8' "SetObsCode"; } "SetObsCoding"; } "SetObsCode"; content -> obs.value = content "SetValue"; } "SetPrimarySeriesObservation"; immz.dateSeriesCompleted as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { patient -> obs.subject = patient "SetPatient"; content -> obs.code = create('CodeableConcept') as code then { content -> code.coding = create('Coding') as coding then { content -> coding.system = 'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1' "SetObsSystem"; content -> coding.code = 'DE81' "SetObsCode"; } "SetObsCoding"; } "SetObsCode"; content -> obs.value = content "SetValue"; } "SetDateSeriesObservation"; immz.hivStatus as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { patient -> obs.subject = patient "SetPatient"; content -> obs.code = create('CodeableConcept') as code then { content -> code.coding = create('Coding') as coding then { content -> coding.system = 'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1' "SetObsSystem"; content -> coding.code = 'DE10' "SetObsCode"; } "SetObsCoding"; } "SetObsCode"; content -> obs.value = create('CodeableConcept') as code then { content -> code.coding = content "SetCoding"; } "SetCodeableConcept"; } "SetHIVStatusObservation"; immz.pretermBirth as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { patient -> obs.subject = patient "SetPatient"; content -> obs.code = create('CodeableConcept') as code then { content -> code.coding = create('Coding') as coding then { content -> coding.system = 'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1' "SetObsSystem"; content -> coding.code = 'DE15' "SetObsCode"; } "SetObsCoding"; } "SetObsCode"; content -> obs.value = content "SetValue"; } "SetPretermBirthObservation"; immz.severelyImmunosuppressed as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { patient -> obs.subject = patient "SetPatient"; content -> obs.code = create('CodeableConcept') as code then { content -> code.coding = create('Coding') as coding then { content -> coding.system = 'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1' "SetObsSystem"; content -> coding.code = 'DE92' "SetObsCode"; } "SetObsCoding"; } "SetObsCode"; content -> obs.value = content "SetValue"; } "SetSeverelyImmunosuppressedObservation"; immz.artStartDate as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { patient -> obs.subject = patient "SetPatient"; content -> obs.code = create('CodeableConcept') as code then { content -> code.coding = create('Coding') as coding then { content -> coding.system = 'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1' "SetObsSystem"; content -> coding.code = 'DE49' "SetObsCode"; } "SetObsCoding"; } "SetObsCode"; content -> obs.value = content "SetValue"; } "SetARTDateObservation"; immz.vaccineHistory as history -> bundle.entry as entry, entry.resource = create('Immunization') as imm then { patient -> imm.patient = patient "SetPatient"; history -> imm.status = 'completed' "SetStatus"; history.vaccineType as vaccine -> imm.vaccineCode as code then { vaccine -> code.coding = vaccine "SetVaccineCoding"; } "SetVaccineType"; history.vaccineDate as date -> imm.occurrence = cast(date, 'string') "SetDate"; } "SetVaccineHistoryObservation"; } "GetPatient"; }
{
"resourceType" : "StructureMap",
"id" : "IMMZD1LMToResources",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap IMMZD1LMToResources</b></p><a name=\"IMMZD1LMToResources\"> </a><a name=\"hcIMMZD1LMToResources\"> </a><a name=\"IMMZD1LMToResources-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> "</span>http://smart.who.int/immunizations-measles/StructureMap/IMMZD1LMToResources<span style=\"color: navy\">" = "</span>IMMZD1LMToResources<span style=\"color: navy\">"\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Immunization - Client History - Transform logical model to resources</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-IMMZD1ClientHistoryMeasles.html\" title=\"IMMZ.D1 Capture Client History for Measles\">http://smart.who.int/immunizations-measles/StructureDefinition/IMMZD1ClientHistoryMeasles</a><span style=\"color: navy\">" </span><b>alias </b>IMMZD1 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R4/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">" </span><b>alias </b>Bundle <b>as </b><b>target</b>\r\n\r\n<b>group </b>IMMZD1ToBundle<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">immz</span><span style=\"color: navy\"> : </span>IMMZD1, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> immz<span style=\"color: navy\"><b> -> </b></span>bundle.type = <span style=\"color: blue\">'collection'</span> <i>"SetCollection"</i><span style=\"color: navy\">;</span>\r\n immz.patient<b> as </b><span style=\"color: maroon\">patient</span><b> then</b><span style=\"color: navy\"> {\r\n</span> immz.dose0<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">obs</span><b> then</b><span style=\"color: navy\"> {\r\n</span> patient<span style=\"color: navy\"><b> -> </b></span>obs.subject = <span style=\"color: maroon\">patient</span> <i>"SetPatient"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>code.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1'</span> <i>"SetObsSystem"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'DE80'</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.value = <span style=\"color: maroon\">content</span> <i>"SetValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetDose0Observation"</i><span style=\"color: navy\">;</span>\r\n immz.completedPrimarySeries<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">obs</span><b> then</b><span style=\"color: navy\"> {\r\n</span> patient<span style=\"color: navy\"><b> -> </b></span>obs.subject = <span style=\"color: maroon\">patient</span> <i>"SetPatient"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>code.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1'</span> <i>"SetObsSystem"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'DE8'</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.value = <span style=\"color: maroon\">content</span> <i>"SetValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetPrimarySeriesObservation"</i><span style=\"color: navy\">;</span>\r\n immz.dateSeriesCompleted<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">obs</span><b> then</b><span style=\"color: navy\"> {\r\n</span> patient<span style=\"color: navy\"><b> -> </b></span>obs.subject = <span style=\"color: maroon\">patient</span> <i>"SetPatient"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>code.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1'</span> <i>"SetObsSystem"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'DE81'</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.value = <span style=\"color: maroon\">content</span> <i>"SetValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetDateSeriesObservation"</i><span style=\"color: navy\">;</span>\r\n immz.hivStatus<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">obs</span><b> then</b><span style=\"color: navy\"> {\r\n</span> patient<span style=\"color: navy\"><b> -> </b></span>obs.subject = <span style=\"color: maroon\">patient</span> <i>"SetPatient"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>code.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1'</span> <i>"SetObsSystem"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'DE10'</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>code.coding = <span style=\"color: maroon\">content</span> <i>"SetCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetCodeableConcept"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetHIVStatusObservation"</i><span style=\"color: navy\">;</span>\r\n immz.pretermBirth<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">obs</span><b> then</b><span style=\"color: navy\"> {\r\n</span> patient<span style=\"color: navy\"><b> -> </b></span>obs.subject = <span style=\"color: maroon\">patient</span> <i>"SetPatient"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>code.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1'</span> <i>"SetObsSystem"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'DE15'</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.value = <span style=\"color: maroon\">content</span> <i>"SetValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetPretermBirthObservation"</i><span style=\"color: navy\">;</span>\r\n immz.severelyImmunosuppressed<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">obs</span><b> then</b><span style=\"color: navy\"> {\r\n</span> patient<span style=\"color: navy\"><b> -> </b></span>obs.subject = <span style=\"color: maroon\">patient</span> <i>"SetPatient"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>code.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1'</span> <i>"SetObsSystem"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'DE92'</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.value = <span style=\"color: maroon\">content</span> <i>"SetValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetSeverelyImmunosuppressedObservation"</i><span style=\"color: navy\">;</span>\r\n immz.artStartDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">obs</span><b> then</b><span style=\"color: navy\"> {\r\n</span> patient<span style=\"color: navy\"><b> -> </b></span>obs.subject = <span style=\"color: maroon\">patient</span> <i>"SetPatient"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>code.coding = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1'</span> <i>"SetObsSystem"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'DE49'</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetObsCode"</i><span style=\"color: navy\">;</span>\r\n content<span style=\"color: navy\"><b> -> </b></span>obs.value = <span style=\"color: maroon\">content</span> <i>"SetValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetARTDateObservation"</i><span style=\"color: navy\">;</span>\r\n immz.vaccineHistory<b> as </b><span style=\"color: maroon\">history</span><span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Immunization'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">imm</span><b> then</b><span style=\"color: navy\"> {\r\n</span> patient<span style=\"color: navy\"><b> -> </b></span>imm.patient = <span style=\"color: maroon\">patient</span> <i>"SetPatient"</i><span style=\"color: navy\">;</span>\r\n history<span style=\"color: navy\"><b> -> </b></span>imm.status = <span style=\"color: blue\">'completed'</span> <i>"SetStatus"</i><span style=\"color: navy\">;</span>\r\n history.vaccineType<b> as </b><span style=\"color: maroon\">vaccine</span><span style=\"color: navy\"><b> -> </b></span>imm.vaccineCode<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {\r\n</span> vaccine<span style=\"color: navy\"><b> -> </b></span>code.coding = <span style=\"color: maroon\">vaccine</span> <i>"SetVaccineCoding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetVaccineType"</i><span style=\"color: navy\">;</span>\r\n history.vaccineDate<b> as </b><span style=\"color: maroon\">date</span><span style=\"color: navy\"><b> -> </b></span>imm.occurrence = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">date</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'string'</span><span style=\"color: navy\">)</span> <i>"SetDate"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetVaccineHistoryObservation"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"GetPatient"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
},
"url" : "http://smart.who.int/immunizations-measles/StructureMap/IMMZD1LMToResources",
"version" : "0.1.0",
"name" : "IMMZD1LMToResources",
"status" : "draft",
"date" : "2024-09-21T14:59:40+00:00",
"publisher" : "WHO",
"contact" : [
{
"name" : "WHO",
"telecom" : [
{
"system" : "url",
"value" : "http://who.int"
}
]
}
],
"description" : "Immunization - Client History - Transform logical model to resources",
"structure" : [
{
"url" : "http://smart.who.int/immunizations-measles/StructureDefinition/IMMZD1ClientHistoryMeasles",
"mode" : "source",
"alias" : "IMMZD1"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
"mode" : "target",
"alias" : "Bundle"
}
],
"group" : [
{
"name" : "IMMZD1ToBundle",
"typeMode" : "none",
"input" : [
{
"name" : "immz",
"type" : "IMMZD1",
"mode" : "source"
},
{
"name" : "bundle",
"type" : "Bundle",
"mode" : "target"
}
],
"rule" : [
{
"name" : "SetCollection",
"source" : [
{
"context" : "immz"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "type",
"transform" : "copy",
"parameter" : [
{
"valueString" : "collection"
}
]
}
]
},
{
"name" : "GetPatient",
"source" : [
{
"context" : "immz",
"element" : "patient",
"variable" : "patient"
}
],
"rule" : [
{
"name" : "SetDose0Observation",
"source" : [
{
"context" : "immz",
"element" : "dose0",
"variable" : "content"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "entry"
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
}
],
"rule" : [
{
"name" : "SetPatient",
"source" : [
{
"context" : "patient"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "subject",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patient"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "code",
"variable" : "code",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "SetObsCoding",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "SetObsSystem",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DE80"
}
]
}
]
}
]
}
]
},
{
"name" : "SetValue",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "SetPrimarySeriesObservation",
"source" : [
{
"context" : "immz",
"element" : "completedPrimarySeries",
"variable" : "content"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "entry"
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
}
],
"rule" : [
{
"name" : "SetPatient",
"source" : [
{
"context" : "patient"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "subject",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patient"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "code",
"variable" : "code",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "SetObsCoding",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "SetObsSystem",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DE8"
}
]
}
]
}
]
}
]
},
{
"name" : "SetValue",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "SetDateSeriesObservation",
"source" : [
{
"context" : "immz",
"element" : "dateSeriesCompleted",
"variable" : "content"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "entry"
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
}
],
"rule" : [
{
"name" : "SetPatient",
"source" : [
{
"context" : "patient"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "subject",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patient"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "code",
"variable" : "code",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "SetObsCoding",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "SetObsSystem",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DE81"
}
]
}
]
}
]
}
]
},
{
"name" : "SetValue",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "SetHIVStatusObservation",
"source" : [
{
"context" : "immz",
"element" : "hivStatus",
"variable" : "content"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "entry"
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
}
],
"rule" : [
{
"name" : "SetPatient",
"source" : [
{
"context" : "patient"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "subject",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patient"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "code",
"variable" : "code",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "SetObsCoding",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "SetObsSystem",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DE10"
}
]
}
]
}
]
}
]
},
{
"name" : "SetCodeableConcept",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "value",
"variable" : "code",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "SetCoding",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
}
]
},
{
"name" : "SetPretermBirthObservation",
"source" : [
{
"context" : "immz",
"element" : "pretermBirth",
"variable" : "content"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "entry"
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
}
],
"rule" : [
{
"name" : "SetPatient",
"source" : [
{
"context" : "patient"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "subject",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patient"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "code",
"variable" : "code",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "SetObsCoding",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "SetObsSystem",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DE15"
}
]
}
]
}
]
}
]
},
{
"name" : "SetValue",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "SetSeverelyImmunosuppressedObservation",
"source" : [
{
"context" : "immz",
"element" : "severelyImmunosuppressed",
"variable" : "content"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "entry"
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
}
],
"rule" : [
{
"name" : "SetPatient",
"source" : [
{
"context" : "patient"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "subject",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patient"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "code",
"variable" : "code",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "SetObsCoding",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "SetObsSystem",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DE92"
}
]
}
]
}
]
}
]
},
{
"name" : "SetValue",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "SetARTDateObservation",
"source" : [
{
"context" : "immz",
"element" : "artStartDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "entry"
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "resource",
"variable" : "obs",
"transform" : "create",
"parameter" : [
{
"valueString" : "Observation"
}
]
}
],
"rule" : [
{
"name" : "SetPatient",
"source" : [
{
"context" : "patient"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "subject",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patient"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "code",
"variable" : "code",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"rule" : [
{
"name" : "SetObsCoding",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding",
"transform" : "create",
"parameter" : [
{
"valueString" : "Coding"
}
]
}
],
"rule" : [
{
"name" : "SetObsSystem",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://smart.who.int/immunizations-measles/CodeSystem/IMMZ.D1"
}
]
}
]
},
{
"name" : "SetObsCode",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "DE49"
}
]
}
]
}
]
}
]
},
{
"name" : "SetValue",
"source" : [
{
"context" : "content"
}
],
"target" : [
{
"context" : "obs",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "SetVaccineHistoryObservation",
"source" : [
{
"context" : "immz",
"element" : "vaccineHistory",
"variable" : "history"
}
],
"target" : [
{
"context" : "bundle",
"contextType" : "variable",
"element" : "entry",
"variable" : "entry"
},
{
"context" : "entry",
"contextType" : "variable",
"element" : "resource",
"variable" : "imm",
"transform" : "create",
"parameter" : [
{
"valueString" : "Immunization"
}
]
}
],
"rule" : [
{
"name" : "SetPatient",
"source" : [
{
"context" : "patient"
}
],
"target" : [
{
"context" : "imm",
"contextType" : "variable",
"element" : "patient",
"transform" : "copy",
"parameter" : [
{
"valueId" : "patient"
}
]
}
]
},
{
"name" : "SetStatus",
"source" : [
{
"context" : "history"
}
],
"target" : [
{
"context" : "imm",
"contextType" : "variable",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "completed"
}
]
}
]
},
{
"name" : "SetVaccineType",
"source" : [
{
"context" : "history",
"element" : "vaccineType",
"variable" : "vaccine"
}
],
"target" : [
{
"context" : "imm",
"contextType" : "variable",
"element" : "vaccineCode",
"variable" : "code"
}
],
"rule" : [
{
"name" : "SetVaccineCoding",
"source" : [
{
"context" : "vaccine"
}
],
"target" : [
{
"context" : "code",
"contextType" : "variable",
"element" : "coding",
"transform" : "copy",
"parameter" : [
{
"valueId" : "vaccine"
}
]
}
]
}
]
},
{
"name" : "SetDate",
"source" : [
{
"context" : "history",
"element" : "vaccineDate",
"variable" : "date"
}
],
"target" : [
{
"context" : "imm",
"contextType" : "variable",
"element" : "occurrence",
"transform" : "cast",
"parameter" : [
{
"valueId" : "date"
},
{
"valueString" : "string"
}
]
}
]
}
]
}
]
}
]
}
]
}
XIG built as of ??metadata-date??. Found ??metadata-resources?? resources in ??metadata-packages?? packages.